copyToRedis

Copy a structure into Redis variables.

void
copyToRedis
(
T
)
(,
Redis target
,
string prefix
)

Parameters

source T

Structure to copy

target Redis

Database in which to copy the structure

prefix string

Prefix to be added to the structure members

Examples

If the structure is:

struct Foo {
  int intParm;
  string stringParm;
  bool is60Hz
}

Then

Foo foo;
copyToRedis!Foo(foo, redis, "f:")

set these redis variables:

  • f:int_parm
  • f:string_parm
  • f:is60_hz ATTENTION between letter and number does not add underscore

Meta